package com.zx._12_算法.剑指offer._2022;

/**
 * https://leetcode.cn/problems/que-shi-de-shu-zi-lcof/
 */
public class n个数字中缺失的数字 {

    public int missingNumber(int[] nums) {
        for (int i = 0; i < nums.length; i++) {
            if (nums[i] != i) {
                return i;
            }
        }
        return nums.length;
    }
}
